% ildc7199.m
% 7/2000

% inflation index for acu scores

% years = 71 - 99
% includes a(1) and b(1) as parameters but sets bbonn to off
% reads data file: acu71_99.txt
% sets up i-vector, a number for each member
%    each member is listed about 5 times, thus the i-vector is
%    about 1/5 as large as the number of members


%%%%%%%%%%%%%%%  set constants   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%

MaxMem = 10000;
BeginYear = 1947;  %note not 71
% no ada scores for 1962.  60 represented by 61, 61 by 62
% actual 1947 data is recorded in matlab program as year 1948
% data file does not list any 62 scores
HEndYear = 2006; % House End Year
EndYear   = 2*HEndYear - BeginYear + 1; % senate years are 100 to 125
BaseYear = 1980;
baseq = BaseYear-BeginYear+1;

Nt = EndYear - BeginYear + 1;
ka = Nt; % bbon must be set to zero for at least one of the a(t)'s
kb = Nt; % bbon must be set to zero for at least one of the b(t)'s


%%%%%%%%%  load a-seed and b-seed  %%%%%%%%%%%%%%%%%%%%%%%%%%%
a = zeros(Nt,1);
b = ones(Nt,1);
a(baseq) = 0;
b(baseq) = 1;
%load a.txt; a=a; 
%load b.txt; b=b;
%a(baseq) = 0;
%b(baseq) = 1;

%%%%%%%%%%%%%%% load data  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

disp('Loading Data');
load ada4706.txt; ada = ada4706; clear ada4706.dat;
%load \cdat\ada94dy.dat; ada = ada94dy; delete ada94dy;
%load \cdat\ia94sd3.dat; ada = ia94sd3; delete ia94sd3;

icpsr = ada(:,3);
y = ada(:,4);
t = ada(:,1);
%pty = ada(:,4);
chamber = ada(:,2);
Ns = length(icpsr);

